Option Explicit

' ======================================================================
' 提供栈对象 `ObjStack`, `PrimitiveStack` 的操作
' ======================================================================

' 检查栈是否是 `Nothing` 或者容量为 0
' @param s 需要检查的栈
' @return Boolean 栈是否是 `Nothing` 或者容量为 0
Public Function isEmptyObjStack(ByRef s As ObjStack) As Boolean
    If s Is Nothing Then
        isEmptyObjStack = True
    ElseIf s.Count = 0 Then
        isEmptyObjStack = True
    End If
End Function

' 检查栈是否是 `Nothing` 或者容量为 0
' @param s 需要检查的栈
' @return Boolean 栈是否是 `Nothing` 或者容量为 0
Public Function isEmptyPrimitiveStack(ByRef s As PrimitiveStack) As Boolean
    If s Is Nothing Then
        isEmptyPrimitiveStack = True
    ElseIf s.Count = 0 Then
        isEmptyPrimitiveStack = True
    End If
End Function